<template>
  <el-container class="layout-container-demo" style="height: 100vh">
    <el-main>
      <el-scrollbar>
        <el-table :data="tableData">
          <el-table-column prop="id" label="评价id" />
          <el-table-column prop="commodityIdList" label="商品IdList" />
          <el-table-column prop="orderId" label="订单Id" />
          <el-table-column prop="commodityScoreList" label="商品评分List" />
          <el-table-column prop="logisticsScore" label="物流评分" />
          <el-table-column prop="shopScore" label="店铺评分" />
          <el-table-column prop="detailsList" label="商品评价内容List" />
        </el-table>
      </el-scrollbar>
    </el-main>
  </el-container>
</template>
  
<script lang="ts" setup>
import { ref } from 'vue'
import { getEvaluateByShopId } from "../../api/evaluate/"
import { ElContainer } from 'element-plus';
import { useRouter } from 'vue-router'
const router = useRouter();

// 获取店铺优惠卷
const shopId = router.currentRoute.value.query.shopId;
let tableData = ref([])
if (shopId != null) {
  const evaluate = getEvaluateByShopId({ shopId: shopId })
  evaluate.then((res) => {
    if (res.code === 200) {
      tableData.value = res.data
    }
  })
}



</script>
  
<style scoped>
.layout-container-demo .el-header {
  position: relative;
  background-color: var(--el-color-primary-light-7);
  color: var(--el-text-color-primary);
}

.layout-container-demo .el-aside {
  color: var(--el-text-color-primary);
  background: var(--el-color-primary-light-8);
}

.layout-container-demo .el-menu {
  border-right: none;
}

.layout-container-demo .el-main {
  padding: 0;
}

.layout-container-demo .toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  right: 20px;
}
</style>
  